package scuff.msg.json.gson

import scuff.DoubleDispatch
import scuff.msg.util.Classifier
import scuff.msg.json.ReflectiveDispatchingJsonReader

import com.google.gson.Gson

abstract class ReflectiveGsonReader[CB, PL <: DoubleDispatch[CB]](gson: Gson = new Gson)
    extends ReflectiveDispatchingJsonReader[CB, PL] {

  protected def deserialize(pl: String, msgType: Class[_ <: PL]): PL = gson.fromJson(pl, msgType)

}